home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Files / FileReader.h < prev    next >
Text File  |  1997-06-28  |  613b  |  33 lines

  1. // FileReader.h
  2.  
  3. #ifndef FileReader_h
  4. #define FileReader_h
  5.  
  6. #ifndef Integers_h
  7. #include "Integers.h"
  8. #endif
  9.  
  10. class FileAccessPath;
  11. class Buffer;
  12.  
  13. class FileReader: private ParamBlockRec
  14.   {
  15.     private:
  16.         bool finished;
  17.         
  18.         void ThrowError( OSErr );
  19.         
  20.     public:
  21.         FileReader( const FileAccessPath&, uint32 position = 0 );
  22.         
  23.         uint32 Position() const                { return ioParam.ioPosOffset; }
  24.         void SetPosition( uint32 p )        { ioParam.ioPosOffset = p; finished = false; }
  25.         
  26.         bool Finished() const                { return finished; }
  27.         bool Unfinished() const                { return !finished; }
  28.         
  29.         uint32 operator>>( Buffer& );
  30.   };
  31.  
  32. #endif
  33.